<?php
class ConfigHeaderSites extends AppModel
{
  var $name = 'ConfigHeaderSites';
  var $useTable = "config_header_sites";
  var $id = "chs_id";
  var $primaryKey = "chs_id";

	function getFieldValue($field, $key, $key_value)
	{
		$rows = $this->field($field, array("$key" => "$key_value"));
		return $rows;
  }

  function getFieldsValue($whereArray, $fields)
  {
		$rows = $this->find($whereArray, $fields, null, null);
		return $rows;
  }

  function setPrimaryKey ($key)
  {
    $this->primaryKey = $key;
  }

  function insertData($values)
  {
    $modelName = $this->name;
    return $this->save(array($modelName => $values));
  }
}
?>
